//
//  OrderDeliveryItemCell.m
//  JiaoX
//
//  Created by yinqy on 15/2/3.
//  Copyright (c) 2015年 北京娇羞科技有限公司. All rights reserved.
//

#import "OrderDeliveryItemCell.h"
#import "OrderDeliveryItemView.h"

@implementation OrderDeliveryItemCell

+ (instancetype)cellWithTableView:(UITableView *)tableView indexpath:(NSIndexPath *)indexpath{
    static NSString *ORDERITEM_ID = @"ORDERDELIVERYITEMCELL";
    OrderDeliveryItemCell *cell = [tableView dequeueReusableCellWithIdentifier:ORDERITEM_ID];
    if (!cell) {
        cell = [[OrderDeliveryItemCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:ORDERITEM_ID];
    }
    [cell.orderDeliveryItemView setIndexPath:indexpath];
    return cell;
}
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        OrderDeliveryItemView *orderDeliveryItemView =  [[OrderDeliveryItemView alloc]init];
        _orderDeliveryItemView = orderDeliveryItemView;
        [self addSubview:orderDeliveryItemView];
    }
    return self;
}

-(void)setDeliveryItemframe:(OrderDeliveryItemFrame *)deliveryItemframe{
    _deliveryItemframe = deliveryItemframe;
    [_orderDeliveryItemView setDeliveryItemFrame:deliveryItemframe];
}
@end
